import request from '@/utils/request'

export function fetchMasterdataTableList(data) {
  return request({
    url: '/system/metadataModel/table/list',
    method: 'post',
    data
  })
}
//获取目录树
export function fetchMasterdataDirectoryList(data) {
  return request({
    url: '/system/masterdata/MasterdataDirectory/list',
    method: 'post',
    data
  })
}

//根据ID获取对应的数据记录数
export function getNumberData(data) {
  return request({
    url: `/system/metadataModel/table/queryTableTotal`,
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/json',
    },
    transformRequest: [
      (data, headers) => {
        return data
      },
    ],
  })
}

export function dataDirectoryList(data) {
  return request({
    url: '/system/metamodel/treeList',
    method: 'post',
    data
  })
}
